
//
//  QryAllSiteInfoResponse.m
//  EasyToo
//
//  Created by zhengzhe on 13-8-25.
//
//

#import "QryAllSiteInfoResponse.h"
#import "AllSiteInfo.h"
#import "SiteTicketInfo.h"

@implementation QryAllSiteInfoResponse

- (void)parse
{
    [super parse];
    
    if (self.bodyDict)
    {
        //景区信息
        self.siteInfoArray = [[NSMutableArray alloc] init];
        NSArray *siteJsonArray = GetDictionaryArrayDefaultNil(self.bodyDict, @"sceneList");
        for (int i = 0; i < [siteJsonArray count]; i++)
        {
            NSDictionary *siteInfoJson = [siteJsonArray objectAtIndex:i];
            AllSiteInfo *siteInfo = [[AllSiteInfo alloc] initWithDictionary:siteInfoJson];
            
            [self.siteInfoArray addObject:siteInfo];
            
            [siteInfo release];
        }
        
        //票务信息
        self.ticketInfoArray = [[NSMutableArray alloc] init];
        NSArray *ticketJsonArray = GetDictionaryArrayDefaultNil(self.bodyDict, @"sceneTicketList");
        for (int i = 0; i < [ticketJsonArray count]; i++)
        {
            NSDictionary *ticketInfoJson = [ticketJsonArray objectAtIndex:i];
            SiteTicketInfo *ticketInfo = [[SiteTicketInfo alloc] initWithDictionary:ticketInfoJson];
            [self.ticketInfoArray addObject:ticketInfo];
            
            [ticketInfo release];
        }
    }
}


@end
